3.40 \(\int \frac {2+3 x+5 x^2}{3-x+2 x^2} \, dx\)

Optimal. Leaf size=42 \[ \frac {11}{8} \log \left (2 x^2-x+3\right )+\frac {5 x}{2}+\frac {33 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{4 \sqrt {23}} \]

[Out]

5/2*x+11/8*ln(2*x^2-x+3)+33/92*arctan(1/23*(1-4*x)*23^(1/2))*23^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {1657, 634, 618, 204, 628} \[ \frac {11}{8} \log \left (2 x^2-x+3\right )+\frac {5 x}{2}+\frac {33 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{4 \sqrt {23}} \]

Antiderivative was successfully verified.

[In]

Int[(2 + 3*x + 5*x^2)/(3 - x + 2*x^2),x]

[Out]

(5*x)/2 + (33*ArcTan[(1 - 4*x)/Sqrt[23]])/(4*Sqrt[23]) + (11*Log[3 - x + 2*x^2])/8

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {2+3 x+5 x^2}{3-x+2 x^2} \, dx &=\int \left (\frac {5}{2}-\frac {11 (1-x)}{2 \left (3-x+2 x^2\right )}\right ) \, dx\\ &=\frac {5 x}{2}-\frac {11}{2} \int \frac {1-x}{3-x+2 x^2} \, dx\\ &=\frac {5 x}{2}+\frac {11}{8} \int \frac {-1+4 x}{3-x+2 x^2} \, dx-\frac {33}{8} \int \frac {1}{3-x+2 x^2} \, dx\\ &=\frac {5 x}{2}+\frac {11}{8} \log \left (3-x+2 x^2\right )+\frac {33}{4} \operatorname {Subst}\left (\int \frac {1}{-23-x^2} \, dx,x,-1+4 x\right )\\ &=\frac {5 x}{2}+\frac {33 \tan ^{-1}\left (\frac {1-4 x}{\sqrt {23}}\right )}{4 \sqrt {23}}+\frac {11}{8} \log \left (3-x+2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 42, normalized size = 1.00 \[ \frac {11}{8} \log \left (2 x^2-x+3\right )+\frac {5 x}{2}-\frac {33 \tan ^{-1}\left (\frac {4 x-1}{\sqrt {23}}\right )}{4 \sqrt {23}} \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + 3*x + 5*x^2)/(3 - x + 2*x^2),x]

[Out]

(5*x)/2 - (33*ArcTan[(-1 + 4*x)/Sqrt[23]])/(4*Sqrt[23]) + (11*Log[3 - x + 2*x^2])/8

________________________________________________________________________________________

fricas [A]  time = 0.86, size = 33, normalized size = 0.79 \[ -\frac {33}{92} \, \sqrt {23} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) + \frac {5}{2} \, x + \frac {11}{8} \, \log \left (2 \, x^{2} - x + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)/(2*x^2-x+3),x, algorithm="fricas")

[Out]

-33/92*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) + 5/2*x + 11/8*log(2*x^2 - x + 3)

________________________________________________________________________________________

giac [A]  time = 0.21, size = 33, normalized size = 0.79 \[ -\frac {33}{92} \, \sqrt {23} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) + \frac {5}{2} \, x + \frac {11}{8} \, \log \left (2 \, x^{2} - x + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)/(2*x^2-x+3),x, algorithm="giac")

[Out]

-33/92*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) + 5/2*x + 11/8*log(2*x^2 - x + 3)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 34, normalized size = 0.81 \[ \frac {5 x}{2}-\frac {33 \sqrt {23}\, \arctan \left (\frac {\left (4 x -1\right ) \sqrt {23}}{23}\right )}{92}+\frac {11 \ln \left (2 x^{2}-x +3\right )}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2+3*x+2)/(2*x^2-x+3),x)

[Out]

5/2*x+11/8*ln(2*x^2-x+3)-33/92*23^(1/2)*arctan(1/23*(4*x-1)*23^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 33, normalized size = 0.79 \[ -\frac {33}{92} \, \sqrt {23} \arctan \left (\frac {1}{23} \, \sqrt {23} {\left (4 \, x - 1\right )}\right ) + \frac {5}{2} \, x + \frac {11}{8} \, \log \left (2 \, x^{2} - x + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^2+3*x+2)/(2*x^2-x+3),x, algorithm="maxima")

[Out]

-33/92*sqrt(23)*arctan(1/23*sqrt(23)*(4*x - 1)) + 5/2*x + 11/8*log(2*x^2 - x + 3)

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 35, normalized size = 0.83 \[ \frac {5\,x}{2}+\frac {11\,\ln \left (2\,x^2-x+3\right )}{8}-\frac {33\,\sqrt {23}\,\mathrm {atan}\left (\frac {4\,\sqrt {23}\,x}{23}-\frac {\sqrt {23}}{23}\right )}{92} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x + 5*x^2 + 2)/(2*x^2 - x + 3),x)

[Out]

(5*x)/2 + (11*log(2*x^2 - x + 3))/8 - (33*23^(1/2)*atan((4*23^(1/2)*x)/23 - 23^(1/2)/23))/92

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 46, normalized size = 1.10 \[ \frac {5 x}{2} + \frac {11 \log {\left (x^{2} - \frac {x}{2} + \frac {3}{2} \right )}}{8} - \frac {33 \sqrt {23} \operatorname {atan}{\left (\frac {4 \sqrt {23} x}{23} - \frac {\sqrt {23}}{23} \right )}}{92} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**2+3*x+2)/(2*x**2-x+3),x)

[Out]

5*x/2 + 11*log(x**2 - x/2 + 3/2)/8 - 33*sqrt(23)*atan(4*sqrt(23)*x/23 - sqrt(23)/23)/92

________________________________________________________________________________________